package com.sofa.permission.service;

import com.sofa.api.dto.permission.UserRoleDTO;
import com.sofa.permission.domain.po.UserRoles;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;

/**
 * <p>
 * 用户-角色关系表 服务类
 * </p>
 *
 * @author author
 * @since 2025-06-12
 */
public interface IUserRolesService extends IService<UserRoles> {

    Boolean bindDefaultRole(Long userId);

    String getUserRoleCode(Long userId);

    List<Long> getUserIdsByRolesCode(String roleCode);

    Boolean upgradeToAdmin(Long userId);

    Boolean downgradeToUser(Long userId);

    List<UserRoleDTO> getUserRoleByUserIds(List<Long> userIds);
}
